<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="../../css/allFile.css" media="all" />
    <link rel="stylesheet" href="../../iconfont/iconfont.css">

    <title>档案管理详情</title>
</head>

<body>
    <!-- <div class="layui-fluid" id="LAY-component-grid-mobile-pc"> -->

    <!-- 详情内容 -->
    <form class="layui-form layui-form-pane file_detail">
        <div id="main" style="height:350px;"></div>
    </form>


    <form class="layui-form layui-form-pane info">
        <div id="main2" style="height:350px;"></div>

    </form>

    <!-- </div> -->
    <script src="../../layui/layui.js"></script>
    <script src="../../js/echarts.min.js"></script>
    <script>

        layui.use(['jquery', 'element', 'layer'], function () {
            var $ = layui.$
            // 柱状图
            var myChart = echarts.init(document.getElementById('main'));

            // 指定图表的配置项和数据
            var option = {
                title: {
                },
                tooltip: {},
                legend: {
                    left: 'left',
                    data: ['数量']
                },
                xAxis: {
                    data: ["党员", "军转干", "自由择业转退休"]
                },
                yAxis: {},
                series: [{
                    name: '数量',
                    type: 'bar',
                    data: [5, 20, 36],
                    barWidth: 50,
                    itemStyle: {
                        normal: {
                            color: function (params) { // 给出颜色
                                var colorList = ['#ff3e00', '#ff6700', '#ff9600', '#c8ba23', ];
                                return colorList[params.dataIndex]
                            },

                        }
                    }
                }]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
            myChart.resize();
            //饼状图
            var myChart2 = echarts.init(document.getElementById('main2'));
            var option2 = {
                title: {
                    text: '',
                    subtext: '',
                    left: 'center'
                },
                tooltip: {
                    trigger: 'item',
                    formatter: '{a} <br/>{b} : {c} ({d}%)'
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    data: ['自由择业', '退休']
                },
                series: [
                    {
                        name: '访问来源',
                        type: 'pie',
                        radius: '55%',
                        center: ['50%', '60%'],
                        data: [
                            { value: 335, name: '自由择业',itemStyle:{color:'#ff3e00'} },
                            { value: 310, name: '退休',itemStyle:{color:'#ff9600'} }
                           
                        ],
                        emphasis: {
                            itemStyle: {
                                normal: {
                                    color: function (params) { // 给出颜色
                                        var colorList = ['#cca272', '#74608f', '#d7a02b', '#c8ba23', ];
                                        return colorList[params.dataIndex]
                                    },

                                }
                            }
                          
                        }
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart2.setOption(option2);
            myChart2.resize();
        })

    </script>

</body>

</html>